{if $user_profile->username eq $user->username}
    {if $replies|@count eq 0}
        <p>Nessun messaggio</p>
    {else}
        {foreach from=$replies item=reply name=replies}
            <table class="mess" width="600" cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                        <td align="center">
                            <table class="mess_top" width="100%">
                                <tbody>
                                    <tr>
                                        {if $reply->id_message eq $id_parent}
                                        <td id="title" class="small" align="left">
                                            {$reply->title}
                                        </td>
                                       {/if}
                                    </tr>
                                </tbody>
                            </table>
                            <div class="testo_mess">{$reply->text}</div>
                            <table class="mess_bg" width="100%">
                                <tbody>
                                    <tr>
                                        <td class="mess_text" align="left">
                                            Mittente:
                                            <a class="mess_text" href="profile.php?username={$reply->sender}">{$reply->sender}</a>
                                        </td>
                                        <td class="mess_text" align="right"> {Util::getDate($reply->datetime)} alle {Util::getTime($reply->datetime)}</td>
                                    </tr>
                                </tbody>
                            </table>
                        </td>
                    </tr>
                </tbody>
            </table>
        {/foreach}
        {include file="{$TEMPLATES_URL}profile_pm_reply.tpl"}
    {/if}
{else}
    {include file="{$TEMPLATES_URL}profile_summary.tpl"}
{/if}